package com.situ.mall.pattern.singleton;

//饿汉式：没有线程安全问题
public class Singleton1 {
    //类加载时候new出唯一对象，JVM虚拟机保值只有唯一实例
    private static Singleton1 instance = new Singleton1();

    private Singleton1() {
    }

    public static Singleton1 getInstance() {
        return instance;
    }
}
